package com.yeebo.admin.dao;

import com.github.pagehelper.Page;
import com.yeebo.model.admin.SysRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface SysRoleDao {

    int add(SysRole role);

    int update(SysRole updateRole);

    SysRole getRoleById(@Param("id") Long roleId);

    SysRole getRoleByCode(@Param("roleCode") String roleCode);

    List<SysRole> loadRolesByUserId(@Param("userId") Long userId);

    List<SysRole> loadAllValidRoles();

    Page<SysRole> loadSysRoleList(Map<String, Object> queryMap);

}
